# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libqmi
pkgver=1.20.2
pkgrel=1
pkgdesc="QMI modem protocol helper library"
arch=(x86_64)
url="http://www.freedesktop.org/wiki/Software/libqmi/"
license=(GPL2)
depends=(libmbim libgudev)
makedepends=(gtk-doc python git help2man)
_commit=c22afdeb8bbe65b5913e1e0121a3ab9622bac1d4  # tags/1.20.2
source=("git+https://anongit.freedesktop.org/git/libqmi#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --libexecdir=/usr/lib --disable-static --enable-gtk-doc
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
